<template>
  <div>
    
    <el-table :data="tableData" border style="width: 100%" @selection-change="handleSelectionChange">
      <el-table-column prop="name" label="序号" width="60">
          <template slot-scope="scope">{{scope.$index+1}}</template>
        </el-table-column>
      <el-table-column prop="name" label="ID" width="60"> </el-table-column>
      <el-table-column prop="address" label="内容">
        <template slot-scope="scope">
          <div>
            <div>标题</div>
            <div class="colorOne">姓名fdsafds</div>
            <el-row>
              <el-col :span="16">2018-80-3</el-col>
              <el-col :span="4" class="colorOne">喜欢：20</el-col>
              <el-col :span="4" class="colorOne">评论：20</el-col>
            </el-row>
          </div>
        </template>
      </el-table-column>      
      <el-table-column prop="status" label="状态" width="100">
        <template slot-scope="scope">
          {{scope.row.status?'已上线':'已下线'}}
        </template>
      </el-table-column>
      <el-table-column label="操作" width="150">
        <template slot-scope="scope">
          <div>
            <el-button class="addBtn" type="success">通过</el-button>
            <el-button class="addBtn" @click="deletData(scope.row)"> 删除</el-button>
          </div>
        </template>
      </el-table-column>
    </el-table>
    <el-dialog title="提示" :visible.sync="dialogVisible" width="30%" :before-close="handleClose">
      <span>这是一段信息</span>
      <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible = false">取 消</el-button>
        <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
      </span>
    </el-dialog>
  </div>
</template>

<script>
  export default {
    props:['comtData'],
    data() {
      return {
        dialogVisible:false,
      }
    },
    props:['tableData'],
    methods: {
      goEdit(){
        this.$router.push('/Home/editor')
      },
      deletData(val) {
        
      },
      chageStatus(val) {
        let txt ='';
        val? txt ='开启' : txt = '关闭';
       
       
        
      },
      handleClose(done) {
        this.$confirm('确认关闭？')
          .then(_ => {
            done();
          })
          .catch(_ => {});
      },
      //导出
      exportXlxs() {
      },
       //搜索
      sheachFun(val){
        
      },
      //选择 推荐
      handleSelectionChange(val) {
        this.checkFun(val)
      },
      checkFun(val) {
        this.$emit('checkFun',val)
      }
    }
  }
</script>